<!DOCTYPE html>
<html>
<body>
<p>
Test for crbug.com/609820. When running this test on Mac with retina display,
the result should be a clear canvas with no artifact after a few seconds.
</p>
<canvas id='output' width='300' height='250'></canvas>
<script>
var repeat = 350;
var x = y = 0;
var canvas = document.getElementById("output");
var ctx = canvas.getContext('2d');
ctx.fillStyle = "#FF0000";

requestAnimationFrame(animate);

function animate()
{
    ctx.clearRect(x, y, 50, 50);
    x++;
    y++;
    ctx.fillRect(x, y, 50, 50);
    repeat--;
    if (repeat > 0)
        requestAnimationFrame(animate);
}
</script>
</body>
</html>

